package j05fengzhuang;

public class J02 {

}

class Man{
    String name;

    private String phone;

    public void setPhone(String _phone){
        phone = _phone;
    }

    public String getPhone(String name){
        if(name=="赵本山"){
            return phone;
        }
        return "180zzzzzzzz";
    }

    public void say(){
//        System.out.println("name="+name);
        System.out.println("我"+name+"会唱歌");
    }
}
class ManTest{
    public static void main(String[] args) {
        Man zhou = new Man();
        zhou.name = "周杰伦";
        zhou.say();

        Man zhang = new Man();
        zhang.name="张卫健";
        zhang.say();
        zhou.say();//周杰伦
        System.out.println("=====");
        Man mei = new Man();
        mei.name="张惠妹";
        //语义化
        mei.setPhone("12345");
//        mei.phone = "18300000000";
//        System.out.println(mei.name+"的电话是："+mei.phone);

        System.out.println(mei.getPhone("余坤朋"));
        System.out.println(mei.getPhone("赵本山"));//真实

    }
}